package com.richpencil.modules.weixin.rest;


import com.richpencil.modules.system.domain.ImageObject;
import com.richpencil.modules.system.domain.ResultModel;
import com.richpencil.modules.system.rest.BaseController;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

public class uploadimageController extends  BaseController{
    @CrossOrigin
    @RestController
    @RequestMapping("sapi")
    public class UploadImageController extends BaseController {

        @RequestMapping("uploadimage")
        public @ResponseBody
        ResultModel<ImageObject> uploadimage(HttpServletRequest request, @RequestParam("file") MultipartFile file) throws Exception
        {
            ResultModel<ImageObject> rm = new ResultModel<>();
           /* ImageObject imageUrl =this.saveImageObjectByMultipartFileByConfig(file);
            rm.setIsSuccess(true);
            rm.setObject(imageUrl);*/
            return rm;
        }
    }

}
